Programmable logic controllers (PLCs) perform many of the control functions for assembly line machines, machine tools, and other types of industrial equipment. For example, a part arriving at a workstation may contact and close a limit switch or other type of sensing device. As a result, an electrical circuit is completed or broken, and a signal is sent to a PLC indicating the change in condition. The PLC responds to the input as directed by a ladder logic program which, to a large degree, simulates the response of what used to be accomplished by older systems with a set of relays and other control devices. Ladder logic programs instruct the PLC how and when to react to the different signals it receives. The PLC, in turn, instructs the devices it controls in an appropriate manner as specified in the ladder logic program.
A PLC is comprised of a processor, memory, input modules, and output modules. FIG. 13 shows a PLC processor 274 and memory 276, wherein the PLC 272 is (optionally) connected 278 to a personal computer 280. Ladder logic programs may be developed on the personal computer 280 and then downloaded to the PLC 272. The PLC processor 274 executes the ladder logic program. The memory 276 stores output image tables, input image tables, timer storage, counter storage, and ladder logic program workspace. The input modules connect the PLC 272 to input devices and can receive both digital and analog signals. The output modules connect the PLC 272 to machines or other devices and can transmit either digital or analog signals to control them.
In most PLCs, such as those manufactured by the Allen-Bradley Company, memory is structured into "Data Table files" 290-308 as shown in FIG. 15. The memory may be divided into as many as 1000 different Data Table files 290-308. There are a plurality of different types of Data Table files 290-308, each serving a different purpose. These Data Table files 290-308 comprise the Input Image 292, Output Image 290, Status 294, Bit 296, Timer 298, Counter 300, Control 302, Integer 304, and Floating Point 306 files.
The Input Image Data Table file 292 maintains the status of inputs to the PLC. A single bit in the Input Image Data Table file 292 represents the status of a single I/0 point on an input module. If an input bit is ON, then a signal has been received at the input module. If the input bit is OFF, then no signal has been received at the input module.
The Output Image Data Table file 290 controls the outputs from the PLC. A single bit in the Output Image Data Table file 290 represents the status of a single I/0 point on an output module. If an output bit is ON, then the PLC sends a signal to the output module. If the output bit is OFF, then the PLC does not send a signal to the output module.
The Timer Data Table file 298 reflects the status of timers executing in the ladder logic program. Timers keep track of timed intervals according to the ladder logic program. Timers consist of Accumulated Values and Preset Values. The timer intervals are stored in the Timer Accumulators and typically have three bases: (1) 1.0 seconds; (2) 0.1 seconds; and (3) 0.01 seconds. Timer status bits indicate whether the timer is enabled and whether it has timed out.
The Counter Data Table file 300 reflects the status of counters executing in the ladder logic program. Counters accumulate the number of events that occur in a ladder logic program, wherein an event is defined as the transition from a condition of "false" to "true". Counters consist of Accumulated Values and Preset Values Counter status bits indicate the following: whether the counter has overflowed or underflowed; whether the Accumulator Value is greater than or equal to the Preset Value (i.e., "count complete"); an enable bit for "counter up" instructions; and an enable bit for "counter down" instructions.
The remaining Data Table files, Status 294, Bit 296, Control 302, Integer 304, and Floating Point 306, can perform a number of different functions. The various functions of these Data Table files are not essential to an understanding of the present invention.
The PLC uses addresses to refer to words and bits in the Data Tables files 290-308. The addresses allow a ladder logic program to identify Data Table files, elements therein, and bits of the elements. Addresses are generally expressed as "&lt;file type&gt; &lt;file number&gt; : &lt;element&gt;. &lt;subelement&gt;/ &lt;bit number&gt;". Thus, the address "B3:10/1" means "Bit file type; File #3; Element #10; Bit #1".
Addresses of elements in the Output Image 290 and Input Image 292 Data Table files are specified in octal format, i.e., 00-07 and 10-17 are valid bit addresses. All of the other file types use decimal addresses for elements. Bit type 296 Data Table files are "wordless". Addresses entered in a "word/bit" format are converted by the software package into a bit-only format. For example, if address B3:10/1 is entered by the user, the software package converts it to B3/161 (10 words .times.16 bits/words +1 bit). The Output Image 290, Input Image 292, and Status 294 files are unique in that their maximum sizes are set by the PLC processor type as shown in FIG. 15. The remaining file types 296-308 may contain a maximum of 1000 elements. File types may be duplicated as needed to allocate storage space. For example, if more timers than the 1000 available in file "T4" are needed, file "T9" can be created. Ideally, the user would assign timers (or other variables) sequentially to conserve memory.
As shown in FIG. 14, the ladder logic program 282 scanned by the processor of the PLC (and used to control the PLC) is a group of statements 284. These statements 284 are often displayed to programmers in a graphical manner comprising ladder diagrams and functional block instructions. Each statement 284, or "rung" of the ladder logic program 282, consists of at least one condition test 286 and at least one action 288 to be performed when the condition is met. When the condition 286 is met, the rung is "true" and some action 288 is taken, for example, a signal is transmitted, a counter is enabled, a timer is started, etc.
FIG. 16 shows an example "rung". If the input bit 01 has been turned "ON" 310 (i.e., a binary value of "1") by an input device, then the PLC responds by turning output bit 01 "ON" 312 (i.e., a binary value of "1").
The typical PLC is comprised of a number of categories of instructions, including a standard set of arithmetic, logical, move, diagnostic, register, comparison, and data transfer instructions, as would be found in any computer. Program control instructions are also available, allowing the user to structure the ladder logic programs.
In addition to the standard set of instructions, PLCs have a number of special-purpose machine control instructions. Relay-type instructions allow the PLC to monitor and control inputs and outputs for both digital and analog devices. Timer and counter instructions control interval timers and event counters. Sequencer instructions let the PLC monitor and control up to 16 I/0 status bits at the same time. Immediate I/0 instructions scan critical inputs or set critical outputs prior to normal I/0 scans. Control instructions are available to let the PLC perform proportional, integral, and derivative (PID) control of processes and equipment.
In prior art ladder logic development systems, programmers can develop ladder logic programs on-line or off-line from the PLC, communicate with the PLC on-line to monitor the program's status, troubleshoot the ladder logic program, force the status of I/0 status bits ON or OFF to simulate events, and perform a number of other functions. However, these prior art development systems offer little in the way of productivity aids for the ladder logic programmer and serve primarily as limited platforms for programming ladder logic.